﻿
@model Entities.User
@{
    Layout = null;
}
<script type="text/javascript" language="javascript">
    function addUserAjaxDone(json) {
        DWZ.ajaxDone(json);
        if (json.statusCode == DWZ.statusCode.ok) {
            //重新载入当前navTab页面  
            navTabPageBreak();
            if ("closeCurrent" == json.callbackType) {
                setTimeout(function () { $.pdialog.closeCurrent(); }, 100);
            } else if ("forward" == json.callbackType) {
                dialog.reload(json.forwardUrl);
            }

        }
    }
</script>
<div class="pageContent">

@using (Html.BeginForm("Add", "MUser", FormMethod.Post, new { @class = "pageForm required-validate", onsubmit = "return validateCallback(this,addUserAjaxDone);" }))
{ 
 <div class="pageFormContent" layouth="56">
        <p>
            <label style="width:60px;">
                用户名：</label>
            @Html.TextBoxFor(u => u.UserName, new { @class = "required", size = "30", alt = "请输入用户名称" })
        </p>
         <p>
            <label style="width:60px;">
                密码：</label>
            @Html.TextBoxFor(u => u.Password, new { @class = "required", size = "30", type="password" ,alt = "请输入密码" })
        </p>
        <p>
            <label style="width:60px;">
                确认密码：</label>
            @Html.TextBox("confirmPassword", "", new { @class = "required", equalto = "#Password", size = "30", type = "password", alt = "请确认密码" })
        </p>
         <p>
            <label style="width:60px;">
                邮箱：</label>
            @Html.TextBoxFor(u => u.Email, new { @class = "required email", size = "30", alt = "请输入邮箱" })
        </p>

         <p>
            <label style="width:60px;">
                电话号码：</label>
            @Html.TextBoxFor(u => u.Phone, new {  @class = "phone",size = "30" ,alt = "请输入电话号码" })
        </p>
         <p>
            <label style="width:60px;">
                是否可用：</label>
           @Html.CheckBoxFor(u => u.Enabled)
        </p>
         <p>
            <label style="width:60px;">
                备注：</label>
             @Html.TextAreaFor(u => u.Remark, new { size = "30", alt = "请输入备注" })
        </p>
    </div>
    <div class="formBar">
        <ul>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">
                            保存</button></div>
                </div>
            </li>
            <li>
                <div class="button">
                    <div class="buttonContent">
                        <button type="button" class="close">
                            取消</button></div>
                </div>
            </li>
        </ul>
    </div>

}

</div>
